<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
        <title>全民康科技</title>
        <script type="text/javascript" src="/lib/browser-deeplink/browser-deeplink.js"></script>
    </head>
    <body style="background:#333;">
    <div class="coverage" ng-style="coverCss">
        <img src="assets/img/share.png" alt="分享" style="width: 90%;margin-left: 30px;margin-top: 10px;">
    </div>

        <script  type="text/javascript">
            //判断是否是微信浏览器的函数
            function isWeiXin(){
                //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息，这个属性可以用来判断浏览器类型
                var ua = window.navigator.userAgent.toLowerCase();
                //通过正则表达式匹配ua中是否含有MicroMessenger字符串
//                alert(ua);
                if(ua.match(/MicroMessenger/i) == 'micromessenger'){
                    return true;
                }else{
                    return false;
                }
            }

        var url = location.search; //获取url中"?"符后的字串     name是路径，后面是参数
        var theRequest = new Object();
        var url_arr=url.split("&");
        var url_val='';
        for(var i=1;i<url_arr.length;i++){
            url_val=url_val+url_arr[i]+"&";
        }
        console.log(url_val);
        if(url_val){
            url_val = '/'+ url_val.slice(0,-1)
        }
        //获取路径
        var url_name=url_arr[0].split("=");
        if(!url_name[1]){
            url_name[1]='';
        }
        //拼接成功的URL
        console.log("quanminkang://com/" + url_name[1] + url_val);
        var open_url="quanminkang://com/" + url_name[1] + url_val;

           (function() {
               var openUrl = window.location.search;
               try {
                   openUrl = openUrl.substring(1, openUrl.length);
               } catch (e) {}

               var isiOS = navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone') || navigator.userAgent.match('iPod');
               var isAndroid = navigator.userAgent.match('Android')
               var isDesktop = !isiOS && !isAndroid;
               if (isiOS) {
                   if(!isWeiXin()){
                       setTimeout(function() {
                           window.location.href = 'https://www.pgyer.com/aSk0';
                       }, 1000);
                   }

                   window.location.href = "quanminkang://" + url_name[1] + url_val;
               } else if (isAndroid) {
                   if(!isWeiXin()){
                       setTimeout(function() {
                           window.location.href = 'https://www.pgyer.com/A6QY';
                       }, 1000);
                   }
                    // alert("quanminkang://com/" + url_name[1] + url_val);
                   window.location.href = "quanminkang://com/" + url_name[1] + url_val;

               } else {
                   window.location.href = "quanminkang://com/" + url_name[1] + url_val;
                   
               }

           })();


        </script>
    </body>
</html>
